const express=require('express')
const router=express.Router()
const userInfoHandler= require('../router_handler/userInfo')
const {update_userInfo_schema,update_password_schema,update_avatar_schema}=require('../schema/user')
const expressJoi=require('@escook/express-joi')
router.get('/userInfo',userInfoHandler.getUserInfo)

router.post('/userInfo',expressJoi(update_userInfo_schema),userInfoHandler.updateUserInfo)

router.post('/updatepwd',expressJoi(update_password_schema),userInfoHandler.updatePassword)

router.post('/update/avatar',expressJoi(update_avatar_schema),userInfoHandler.updateAvatar)

module.exports=router